# -*- encoding : utf-8 -*-
class CreatePunishments < ActiveRecord::Migration
  def change
    create_table :punishments do |t|
      t.integer :user_id
      t.integer :money
      t.datetime :punished_time
      
      t.timestamps
    end
    
    add_index :punishments, :user_id
    
    add_foreign_key(:punishments, :users, column: 'user_id')
  end
end
